package com.zrar.ak.gkpt.dao;

import com.zrar.ak.gkpt.model.bo.FormCirculationDetailsTBO;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @InterfaceName: IFormCirculationDetailsTDao
 * @Description 流转明细表Dao层
 * @Author liyang
 * @Time 2020/03/24
 */
@Repository("formCirculationDetailsTDao")
public interface IFormCirculationDetailsTDao extends Mapper<FormCirculationDetailsTBO> {

    /**
     * 根据业务主键获取对应的有效的流转明细
     * @param businessId
     * @return
     */
    FormCirculationDetailsTBO getEffectiveCirculationDetailsByBusinessId(String businessId);

    /**
     * 根据对应建设单位是否存在对应备案类型的流转明细，来判断是否能够下发
     * @param map
     * @return
     */
    Boolean canRecordAssign(Map map);




    FormCirculationDetailsTBO getCurrentCirculeHandlingOpinions(Map map);

    FormCirculationDetailsTBO getLastCirculeHandlingOpinions(Map map);

    /**
     *
     * @param map
     * @return
     */
    List<FormCirculationDetailsTBO> getCirculeHandlingOpinionsList(Map map);


}
